package cn.childin.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangpeng
 * @since 2023/12/05 17:05
 */
@RestController
public class IndexController {

    private ConfigProperty configProperty;

    @Autowired
    public void setConfigProperty(ConfigProperty configProperty) {
        this.configProperty = configProperty;
    }

    @GetMapping("/hello")
    public String hello() {
        return configProperty.getName() + ":" + configProperty.getAge();
    }

}
